<?php

class McCube_Template_Parser_Element_Command_Action
    extends McCube_Template_Parser_Element_Command_Abstract{

    public function build($inTag, $content){
        $route = McCube_Router::getInstanceOf()->parse($inTag);

        return parent::buildPhpTag('echo McCube_Bundle::getBundle(\''
            .$this->parser->parser->tplEngine->bundle->absoluteName
        .'\')'
        .'->get('
            .str_replace("\n","",var_export($route, true))
        .');');

    }

    public function buildStart($inTag){
        return $this->build($inTag, '');
    }

    public function buildEnd(){

    }
}